import {createRouter,createWebHistory} from 'vue-router'

import  Home from '@/views/Home.vue'
import  Login from '@/views/Login.vue'
import Register  from "@/views/Register.vue";
const router=createRouter({
    history:createWebHistory(import.meta.env.BASE_URL),
    routes:[
        {
            path:'/',
            name:'home',
            component:Home,
        },
        {
            path:'/login',
            name:'login',
            component:Login,
        },
        {
            path:'/register',
            name:'register',
            component:Register,
        }
    ]
})

export default router
//默认到处比人使用的时候只需要 import router form 'xx' 不需要加花括号
//一个模块只能默认到处一个